package com.woniu.command.workingProcedureTypeCommand;

import com.woniu.command.Command;
import com.woniu.command.handler.WorkingProcedureTypeCommandHandler;
import com.woniu.outlet.po.WorkingProcedureTypePo;
import com.woniu.utils.ApplicationContextHolder;

public class UpdateWorkingProcedureTypeCommand implements Command<WorkingProcedureTypePo, Integer> {

    private WorkingProcedureTypeCommandHandler handler;

    public UpdateWorkingProcedureTypeCommand() {
        this.handler = ApplicationContextHolder.getApplicationContext()
                .getBean(WorkingProcedureTypeCommandHandler.class);
    }

    @Override
    public Integer execute(WorkingProcedureTypePo workingProcedureTypePo) {
        return this.handler.updateWorkingProcedureType(workingProcedureTypePo);
    }
}
